import React from 'react';
import { BrowserRouter, Route, Link, Switch, Redirect } from 'react-router-dom';
import Router from "next/router"
import RouterDemo2 from "./router2"
import { connect } from 'react-redux'
import { render } from 'less';
import {createStore} from 'redux' 
export default function RouterDemo1({ value }) {
    const Btn = () => {
        return <Redirect to='/dashboard' />
    }
    return (
        <React.Fragment>
            <BrowserRouter BrowserRouter >
                <Link to="/Option1">Option 1</Link>
                <Link to="/Option2">Option 1</Link>
                <Switch>
                    <Route path="/Option1" component={() => Valuepath(value)} />
                    <Route path="/Option2" component={() => Valuepath(value)} />
                </Switch>
            </BrowserRouter>
            <Button onClick={() => render(() => Btn())}></Button>
        </React.Fragment >
    );
}